package com.qzimp.fujiancuo.service.impl;

import com.qzimp.fujiancuo.entity.Culture;
import com.qzimp.fujiancuo.mapper.CultureMapper;
import com.qzimp.fujiancuo.service.CultureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CultureServiceImpl implements CultureService {

    @Autowired
    private CultureMapper cultureMapper;

    @Override
    public List<Culture> findByTempleId(Long templeId) {
        return cultureMapper.findByTempleId(templeId);
    }

    @Override
    public void addCulture(Culture culture) {
        cultureMapper.insert(culture);
    }

    @Override
    public void updateCulture(Culture culture) {
        cultureMapper.update(culture);
    }

    @Override
    public void deleteCulture(Long id) {
        cultureMapper.delete(id);
    }
}